home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 4
/
The Arsenal Files 4 (Arsenal Computer).ISO
/
ham
/
sattrk31.tgz
/
sattrack-3.1.tar
/
SatTrack
/
run
/
getsts
< prev
next >
Wrap
Text File
|
1995-03-28
|
2KB
|
107 lines
#! /bin/csh
#
# getsts ----- Manfred Bester 27Mar95
#
# This C shell script can be invoked manually or by cron at a specified time.
# It calls up 'spacelink.msfc.nasa.gov' (192.149.89.61) and gets the most
# recent files with Keplerian two-line element sets for the upcoming or current
# space shuttle mission, as used with SatTrack.
#
# The mission number needs to be specified below in the variable 'stsnum'.
#
# If the shuttle has not been launched yet, 'prelaunch' has to be set to '1',
# and otherwise to '0'.
#
# For Mir docking missions, the variable 'mir' has to be set to '1' and
# otherwise to '0'.
#
# The variable 'satuser' is normally the personal user ID.
#
# If SatTrack is not installed in the user's home directory, the variable
# 'satdir' needs to be changed to the name of the directory that SatTrack is
# installed under. The variable 'satuser' is the UID of the user who is allowed
# to write into the system-wide SatTrack directory, i.e. the person in charge
# of maintaining SatTrack (maybe 'root').
#
#
#
set stsnum=71
set prelaunch=1
set mir=1
set ftphost=192.149.89.61
set satdir=/home/manfred
set satuser=manfred
#
#
#
set userid=$USER@`hostname`.`domainname`
#
if ($USER == $satuser) then
set satdirusr=$satdir
else
set satdirusr=$HOME
mkdir -p $HOME/SatTrack/tle
endif
#
cd $satdirusr/SatTrack/tle
#
if ($1 == -v) then
echo $userid
echo calling $ftphost ...
endif
#
if ($prelaunch == 1) then
set kepfile=STS-$stsnum.Pre-Launch.Keplerian.Elements
set mission=Upcoming
else
set kepfile=STS-$stsnum.Keplerian.Elements
set mission=Current
endif
#
set kepfile=Keplerian.Elements
#
if ($mir == 1) then
set tledir=$mission.Mir.Docking.Mission.STS-$stsnum
else
set tledir=$mission.Shuttle.Mission.STS-$stsnum
endif
#
ftp $1 -n $ftphost << !
user anonymous -$userid
cd Spacelink.Hot.Topics
cd $tledir
cd Keplerian.Elements.and.SAREX.Info
get $kepfile
quit
!
#
if ($1 == -v) then
echo saving data files ...
endif
#
"mv" sts-$stsnum.dat sts-$stsnum.bak
echo STS-$stsnum > sts-$stsnum.dat
sed -n -e /\^1\ /p -e /\^2\ /p $kepfile >> sts-$stsnum.dat
touch sts-$stsnum.dat.all
cat sts-$stsnum.dat >> sts-$stsnum.dat.all
"rm" $kepfile
#
if ($1 == -v) then
echo ""
echo new TLE set:
echo ""
cat sts-$stsnum.dat
echo ""
endif
#
if ($1 == -v) then
echo running 'maketlex' ...
endif
#
maketlex
#
if ($1 == -v) then
echo done.
endif
#